package cn.stylefeng.guns.modular.gridsystem.service;

import cn.stylefeng.guns.core.pojo.page.PageResult;
import cn.stylefeng.guns.modular.gridsystem.entity.BizGatewayChannel;
import cn.stylefeng.guns.modular.gridsystem.model.param.BizGatewayChannelParam;
import cn.stylefeng.guns.modular.gridsystem.model.result.BizGatewayChannelResult;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * biz_gateway_channel 服务类
 *
 * @author ssy
 * @date 2021/09/14 11:47
 */
public interface BizGatewayChannelService extends IService<BizGatewayChannel> {

    /**
     * 分页查询biz_gateway_channel
     *
     * @author ssy
     * @date 2021/09/14 11:47
     */
    PageResult<BizGatewayChannel> page(BizGatewayChannelParam bizGatewayChannelParam);

    /**
     * 查询所有biz_gateway_channel
     *
     * @author ssy
     * @date 2021/09/14 11:47
     */
    List<BizGatewayChannelResult> list(BizGatewayChannelParam bizGatewayChannelParam);

    /**
     * 查询所有biz_gateway_channel
     *
     * @author ssy
     * @date 2021/09/14 11:47
     */
    List<BizGatewayChannelResult> listChannel(BizGatewayChannelParam param);

    /**
     * 添加biz_gateway_channel
     *
     * @author ssy
     * @date 2021/09/14 11:47
     */
    void add(BizGatewayChannelParam bizGatewayChannelParam);

    /**
     * 删除biz_gateway_channel
     *
     * @author ssy
     * @date 2021/09/14 11:47
     */
    void delete(BizGatewayChannelParam bizGatewayChannelParam);

    /**
     * 编辑biz_gateway_channel
     *
     * @author ssy
     * @date 2021/09/14 11:47
     */
    boolean edit(BizGatewayChannelParam bizGatewayChannelParam);

    /**
     * 查看详情biz_gateway_channel
     *
     * @author ssy
     * @date 2021/09/14 11:47
     */
    BizGatewayChannel detail(BizGatewayChannelParam bizGatewayChannelParam);

    BizGatewayChannel listByGatewayId(Integer gatewayId, String micRouter);

    List<BizGatewayChannelResult> listByGId(BizGatewayChannelParam bizGatewayChannelParam);

    PageResult<BizGatewayChannelResult> pageList(BizGatewayChannelParam param);

    Integer countByDIdAndChannel(BizGatewayChannelParam param);

    BizGatewayChannel gatewayChannelByGIdAndChannel(BizGatewayChannelParam param);

    Integer getChannelCount(List<Integer> gatewayIds);

    void editById(BizGatewayChannelParam param);

    /**
     * 通道解除绑定
     *
     * @param param 查询参数
     * @author zxw 2022-11-19 10:26
     */
    void unbinding(BizGatewayChannelParam param);

    /**
     * 通道标记
     *
     * @param param 查询参数
     * @author zxw 2022-11-19 10:39
     */
    void mark(BizGatewayChannelParam param);

    /**
     * 查询通道绑定信息
     * @param param 查询参数
     * @author zxw 2022-12-02 10:09
     */
    String queryChannelBindingInfo(BizGatewayChannelParam param);

    BizGatewayChannel gatewayChannelByCodeAndChannel(BizGatewayChannelParam param);
}
